home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / telecomm / misc / sendserial104.lha / SendSerial.doc < prev    next >
Encoding:
Text File  |  1995-02-11  |  3.9 KB  |  112 lines

  1.  
  2.                       SendSerial 1.04 is FREEWARE
  3.  
  4.                       Copyright © Michael Dreher
  5.  
  6.  
  7.  
  8. Preface
  9. -------
  10. SendSerial is a little program to send a command to the modem and wait
  11. for the result ("OK", "BUSY", "ERROR", ...). I wrote it to initialize
  12. my modem in a batch file and to assure that it is ready. There are
  13. several options, which allow you to use it with other, than the
  14. built-in serial port.
  15.  
  16.  
  17. Usage : SendSerial options
  18. --------------------------
  19. The options are :
  20.  
  21.   ?             : show this little help-page
  22.   -d Devicename : name of the device ("serial.device")
  23.   -u Unitnumber : unitnumber of the device (0)
  24.   -b Baudrate   : baudrate to use (set by Prefs/Serial)
  25.   -c Command    : command to send to modem ("ATZ")
  26.   -r Modemresponse : expected response of the modem ("OK")
  27.   -p PreWaitTime  : time to wait after opening the device (2 seconds)
  28.   -t MaxDelayTime : maximum time to wait for a response of the modem (10 seconds)
  29.   NOECHO : the modem is set to ATE0 and doesn't echo commands
  30.   OUTPUT : show the output of the modem
  31.   LOCK   : use LockDevUnit instead of AttemptDevUnit of OwnDevUnit Library
  32.   NOODU  : disable OwnDevUnit.library support
  33.  
  34.  
  35. All omitted options will get the defaults in parentheses. Some of them
  36. are set by Prefs/Serial. On success the returncode will be set to
  37. zero. If the modemresponse doesn't match the expected string the
  38. returncode will be 5 (WARN), on other errors it will be 10 (ERROR).
  39.  
  40. Remember that many modems drop the line or even reset themselve when
  41. the serial.device gets closed. To avoid this, you have to tell the
  42. modem to ignore the DTR signal (for USR modems this is AT&D0).
  43.  
  44.  
  45. OwnDevUnit support
  46. ------------------
  47. SendSerial attempts to open the OwnDevUnit.library version 1, but it
  48. will also work without the OwnDevUnit.library. Normally SendSerial
  49. uses AttemptDevUnit to obtain a lock to the device, but you can use
  50. the switch 'LOCK' to use LockDevUnit. Without 'LOCK' SendSerial will
  51. fail after about 5 seconds when it doesn't get the device. When you
  52. specify 'LOCK' at the commandline, it will wait until it gets the
  53. device. You can't use CTRL-C to break it when it waits for the lock !
  54.  
  55.  
  56. The 'OUTPUT' option
  57. -------------------
  58. The 'OUTPUT' option can be used to call SendSerial by other programs
  59. and to check the result of the modem command. Be careful : when the
  60. returncode is 10 or above, there was a serios error and the message
  61. you get is the errormessage of SendSerial and not the message of the
  62. modem !
  63.  
  64.  
  65. Examples
  66. --------
  67. 1> sendserial
  68.  
  69. Send "ATZ" to the modem, using the serial.device, unit 0 with the
  70. default baudrate, which can be adjusted with Prefs/Serial. Wait 2
  71. seconds (PreWaitTime) after opening the device to assure the modem is
  72. ready to receive the command. If the modem doesn't answer "OK" within
  73. 10 seconds, the returncode will be 5. On other errors (device can't be
  74. opened, ...) the returncode will be 10 and an errormessage will be
  75. displayed.
  76.  
  77.  
  78. 1> sendserial -d ibmser.device -u 2 -b 19200 -c ATDT1-800-TRAPDOOR -r CONNECT -p 5 -t 60 OUTPUT
  79. ATDT1-800-TRAPDOOR
  80. NO CARRIER
  81.  
  82. Send "ATDT1-800-TRAPDOOR" to the modem, using the ibmser.device, unit
  83. 2 and baudrate 19200. Wait 5 seconds after opening the device. If the
  84. modem doesn't answer "CONNECT" within 60 seconds, the returncode will
  85. be 5. Sendserial does not compare more characters than the length of
  86. the string "CONNECT", that means that any message which starts with
  87. "CONNECT" will result in a returncode of zero. The messages of the
  88. modem will be echoed.
  89.  
  90.  
  91. Comments on the program
  92. -----------------------
  93. SendSerial requires AmigaOS >= 2.04 (V37). It supports the
  94. OwnDevUnit.library, opens the named device in shared-mode and sets
  95. the SERF_RAD_BOOGIE flag. SendSerial can not be run from Workbench !
  96.  
  97.  
  98. Copyright
  99. ---------
  100. This program is Freeware, you can copy and use it for free.
  101.  
  102.  
  103. Programmer
  104. ----------
  105. Michael Dreher
  106. Wielandstr. 12
  107. 71229 Leonberg
  108. Germany
  109.  
  110. Fido Netmail :  2:246/1216.1  Intuition-Base ++49-7152-45768
  111. UseNet: 641287@rz.fht-esslingen.de or michael@galaga.stgt.sub.org
  112.